package main;

import static javax.swing.UIManager.getSystemLookAndFeelClassName;
import static javax.swing.UIManager.setLookAndFeel;

import java.io.File;
import java.io.IOException;
import java.util.List;

import com.google.common.collect.Multiset.Entry;

public class Main {
  public static void main(String[] args) throws IOException {
    try {
      setLookAndFeel(getSystemLookAndFeelClassName());
    } catch (Exception e) {}

    File file = new FileManager().askSourceFile();
    
    List<Entry<String>> data = new Worker(file).readData();

    Outputing out = new Outputing();
    out.fileOutput(data, file.getName());
    out.printOutput(data);
  }
}